<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            font-family: '宋体';
            margin: 0px;
            padding: 0px;
        }
        .print-page{
            width: auto;
            min-height: 1074px;
            font-family: 'SimSun';
            /*background-color: #e6e6e6;*/
            background-color: #f3f3f3;
            color: #000;
            border: 2px solid #000;
            position: relative;
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }
        .page-break{
            page-break-inside: avoid;
            page-break-before: always;
        }
        .print-container{
            width: 100%;
        }
        .page-footer{
            position: absolute;
            bottom: 0;
            height: 333px;
            width: 100%;
            border-top: 2px solid #000;
        }
        .small-font{
            font-size: 10px;
            line-height: 11px;
        }
        .font-weight-pdf{
            font-size: 18px;
            font-weight: bold;
        }
        table{
            width: 100%;
            text-align: center;
            border-bottom: 2px solid #000;
            border-collapse: collapse;
            padding: 0;
        }
        .table-th-row{
            padding: 0;
            font-weight: normal;
            font-size: 14px;
        }
        .table-th-td{
            padding: 0;
            border-right: 2px solid #000;
            border-top: 2px solid #000;
        }
        .footer-pdf{
            height: 98px;
            border-top: 2px solid #000;
            border-bottom: 2px solid #000;
            line-height:14px;
            font-size: 14px;
            position: relative;
        }
    </style>
</head>
<body>
<div>
    <div class="print-page page-break" th:each="pageItem,pageItemStat : ${pageList}">
        <div class="print-container">
            <div style="position: absolute;bottom: 2px;left: 80px;z-index: 999;">
                <img src="" alt="quectel" width="160" height="160">
            </div>
            <div style="position: absolute;left: 0px;top: 0px;width: 180px;height: 30px;">
                <img src="" alt="quectel" width="180" height="30">
            </div>
            <div class="font-weight-pdf">
                <div style="text-align: center">
                    <img width="301" height="19"
                         src="">
                </div>
                <div style="text-align: center;padding-bottom: 2px;" th:text="${pageItem.head.company+'  订单'}"></div>
            </div>
            <div style="border-top: 2px solid #000;border-bottom: 2px solid #000;height: 60px;">
                <div style="height:20px;lint-height:20px;font-size: 14px;text-align: center;" th:text="${pageItem.head.companyAddress}"></div>
                <div style="font-size: 14px;">
                    <div style="width: 50%;float: left;">
                        <div style="width: 180px;float: right">
                            <div style="height:20px;lint-height:20px;">
                                <span style="width: 60px;">TEL：</span>
                                <span style="width: 150px;" th:text="${pageItem.head.companyTel}"></span>
                            </div>
                            <div style="height:20px;lint-height:20px;">
                                <span style="width: 60px;">Date：</span>
                                <span style="width: 150px;" th:text="${pageItem.head.oDate}"></span>
                            </div>
                        </div>
                    </div>
                    <div style="width: 45%;float: right;position: relative;">
                        <div style="position: absolute;right: 80px;bottom: 5px;font-size: 11px;" th:if="${not #strings.isEmpty(pageItem.head.fbk28)}">
                            <span th:text="${pageItem.head.fbk28}"></span>
                        </div>
                        <div style="height:20px;lint-height:20px;">
                            <span>FAX：</span>
                            <span th:text="${pageItem.head.companyFax}"></span>
                        </div>
                        <div style="height:20px;lint-height:20px;">
                            <span>P/O NO：</span>
                            <span th:text="${pageItem.head.erpPurchaseOrderNo}"></span>
                        </div>
                    </div>
                </div>

            </div>
            <div style="height: 100px;padding-left: 10px;font-size: 14px;">
                <div style="width: 40%;float: left;">
                    <div style="min-height: 20px;line-height: 20px;"><span>供货方：</span><span th:text="${pageItem.head.toElsAccountName}"></span></div>
                    <div style="height: 20px;line-height: 20px;"><span>联系人：</span><span th:text="${pageItem.head.legalRepresentative}"></span></div>
                    <div style="height: 20px;line-height: 20px;"><span>采购方：</span><span th:text="${pageItem.head.companyName}"></span></div>
                    <div style="height: 20px;line-height: 20px;"><span>联系人：</span><span th:text="${pageItem.head.purcahseName}"></span></div>
                    <div style="height: 20px;line-height: 20px;"><span>币别：</span><span th:text="${pageItem.head.currency}"></span></div>
                </div>
                <div style="width: 40%;float: right;padding-left: 20px;">
                    <div style="height: 20px;line-height: 20px;"><span>电话：</span><span th:text="${pageItem.head.supplierTel}"></span></div>
                    <div style="height: 20px;line-height: 20px;"><span>传真：</span><span th:text="${pageItem.head.supplierFax}"></span></div>
                    <div style="height: 20px;line-height: 20px;"><span>电话：</span><span th:text="${pageItem.head.purcahseTel}"></span></div>
                    <div style="height: 20px;line-height: 20px;"><span>传真：</span><span th:text="${pageItem.head.purcahseFax}"></span></div>
                    <div style="height: 20px;line-height: 20px;" th:if="${pageItem.head.fbk31 eq 'Y'}">
                        <span>汇率：</span>
                        <span th:text="${pageItem.head.exchangeRate}"></span>
                    </div>
                </div>
            </div>
            <div>
                <table>
                    <tr class="table-th-row">
                        <td class="table-th-td" style="width: 40px;">序号</td>
                        <td class="table-th-td" style="width: 90px;">移远料号</td>
                        <td class="table-th-td" style="width: 80px;">品牌</td>
                        <td class="table-th-td" >型号</td>
                        <td class="table-th-td" >描述</td>
                        <td class="table-th-td" style="width: 50px;">数量</td>
                        <td class="table-th-td" style="width: 70px;">未税单价</td>
                        <td class="table-th-td" style="width: 90px;">未税金额</td>
                        <td  style="padding: 0;border-top: 2px solid #000;width: 60px;">交货日期</td>
                    </tr>
                    <tr style="padding: 0;font-weight: normal;" th:each="item,itemStat : ${pageItem.list}">
                        <td class="small-font table-th-td" th:text="${item.orderItemNumber}"></td>
                        <td class="small-font table-th-td" th:text="${item.materialNumber}"></td>
                        <td class="small-font table-th-td" th:text="${item.materialBrand}"></td>
                        <td class="small-font table-th-td" th:text="${item.materialModel}"></td>
                        <td class="small-font table-th-td" th:text="${item.materialName}"></td>
                        <td class="small-font table-th-td" th:text="${item.quantity}"></td>
                        <td class="small-font table-th-td" th:text="${item.priceExcludingTax}"></td>
                        <td class="small-font table-th-td" th:text="${item.totalNonTaxAmount}"></td>
                        <td class="small-font table-th-td" style="padding: 0;border-top: 2px solid #000;" th:text="${item.deliveryDate}"></td>
                    </tr>
                    <tr style="padding: 0;font-weight: normal;">
                        <td class="small-font table-th-td"  />
                        <td class="small-font table-th-td"  />
                        <td class="small-font table-th-td"  />
                        <td class="small-font table-th-td"  />
                        <td class="small-font table-th-td"  />
                        <td class="small-font table-th-td"  />
                        <td class="small-font table-th-td" >Toatl:</td>
                        <td class="small-font table-th-td" style="padding: 0;border-top: 2px solid #000;" colspan="2" th:text="${pageItem.head.orderAmount}"></td>
                    </tr>
                </table>
            </div>
            <div class="page-footer">
                <div style="height: 115px;position: relative;font-size: 14px;">
                    <div>
                        <div style="height: 22px;text-align: left;padding-left: 10px;">交货地址：</div>
                    </div>
                    <div style="height: 22px;padding-left: 50px;">
                        <span>联系人：</span>
                        <span th:text="${pageItem.head.deliveryName}">何万宁</span>
                    </div>
                    <div style="height: 22px;padding-left: 50px;">
                        <span>电话：</span>
                        <span th:text="${pageItem.head.deliveryTel}">777-888</span>
                    </div>
                    <div style="height: 22px;padding-left: 50px;">
                        <span>地址：</span>
                        <span th:text="${pageItem.head.deliveryAddress}">合肥研发仓库</span>
                    </div>
                    <div style="height: 22px;padding-left: 10px;padding-top: 5px;">
                        <span>付款条件：</span>
                        <span th:text="${pageItem.head.fbk2}">60 天之内 到期净值</span>
                    </div>
                </div>
                <div class="footer-pdf">
                    <div style="position: absolute;top:3px;left: 3px;width: 80px;">注意事项：</div>
                    <div style="position: absolute;top:3px;left: 90px;width: 80%;">
                        <div class="small-font"><span>1.请写上QT开头的移远料号，否则工厂拒收</span></div>
                        <div class="small-font"><span>2.外面请备注“移远物料”字样</span></div>
                        <div class="small-font"><span>3.交货前请与移远确认进仓编号</span></div>
                        <div class="small-font"><span>4.进口货物需用原厂包装</span></div>
                        <div class="small-font"><span>5.到货箱数不符或外包装破损，产品与订单或适用要求不符，买方可拒收货物</span></div>
                        <div class="small-font"><span>6.包装箱内的数量短装，卖方负责免费补齐, 如因此造成产线断线等情况，损失由卖方承担</span></div>
                        <div class="small-font"><span>7.如卖方交货的产品质量有问题（指该产品存在缺陷或不满足产品技术规范描述、不符合卖方的质量声明或双方签订的质量协议要求等），买方 可对到货或已经使用部分退货、对损失有索赔的权利</span></div>
                    </div>
                </div>
                <div style="height: 120px;font-size: 14px;">
                    <div style="width: 30%;float: left">
                        <div style="height:40px">采购方：</div>
                        <div style="height:40px">日期：</div>
                        <div style="height:40px">盖章签字：</div>
                    </div>
                    <div style="width: 40%;float: right;">
                        <div style="height:40px">供应商确认：</div>
                        <div style="height:40px">日期：</div>
                        <div style="height:40px">盖章签字：</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
